package com.fbs.controller;

import com.fbs.entity.Xin;
import com.fbs.service.XinService;
import com.fbs.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
@RequestMapping("name")
public class MyController {
    @Autowired
    private XinService xinService;
    @RequestMapping("name")
    public void name(String name){
        Date date = new Date();
        Xin xin = new Xin();
        xin.setName(name);
        xin.setDate(date);
        Result save = xinService.save(xin);
        System.out.println("save = " + save.toString());
        System.out.println("name = " + name);
    }
}
